import request from '@/utils/request'
//分页查询
export const getData = (data) => {
  return request({
    url: 'out/all',
    method: 'get',
    params: {
      page: data.page,
      pageSize: data.pageSize
    }
  })
}
//根据类别查询
export const getDataByCateId = (id) => {
  return request({
    url: `out/category`,
    method: 'get',
    params: {
      categoryId: id
    }
  })
}

//根据关键字查询
export const searchData = (title) => {
  return request({
    url: 'out/fuzzy',
    method: 'get',
    params: {
      title
    }
  })
}
//删除
export const delData = (id) => {
  return request({
    url: `out/${id}`,
    method: 'delete'
  })
}
